function [ numColor, outField ] = getColor( field, n )
MAX = max(field(:,1));
MIN = min(field(:,1));
RANGE = MAX - MIN;
dist = RANGE / (n * n); 
outField = zeros(n, 3);
outField(:,1:2) = field;
numColor = 1; outField(1, 3) = 1;
for i = 2:n
    if ( field(i,1) - field(i - 1, 1) > dist )
        numColor = numColor + 1;
    end % if
    outField(i,3) = numColor;
end % for
end % function

